var app=getApp();

//请求首页轮播图接口
function getSwipe(page,success,failure){
  app.apiRequest('swipe/', 'GET', {
    page: page
  }, success, failure)
}
//请求首页品牌列表接口
function getBrandList(page, success, failure){
  app.apiRequest('brand/', 'GET', {
    page: page
  }, success, failure)
}
//请求品牌详情页
function getBrandDetail(id, success, failure){
  app.apiRequest('brand/'+id, 'GET', {
    id: id
  }, success, failure)
}
//请求品牌点赞详情列表
function getThumbs(id,page, success, failure){
  app.apiRequest('brand/' + id +"/list_thumbsup/", 'GET', {
    id: id,
    page:page
  }, success, failure)
}
//请求品牌详情页知了指数波动表
function getIndex(id, success, failure){
  app.apiRequest('brand/' + id + "/cicadas/", 'GET', {
    id: id
  }, success, failure)
}
//请求品牌详情页月度论文引用数量接口
function getPaperNum(id, groupby, success, failure){
  app.apiRequest('brand/' + id + '/statics/', 'GET', {
    id: id,
    groupby:groupby
  }, success, failure)
}
//请求品牌详情页点赞接口
function getHand(id, success, failure){
  app.apiRequest('brand/' + id + "/thumbs_up/", 'POST', success, failure)
}
//请求论文详情页论文列表接口
function getPaperList(id, groupby, page, success, failure) {
  app.apiRequest('brand/' + id + "/papers/", 'GET', {
    groupby: groupby,
    page:page
   }, success, failure)
}
module.exports={
  getSwipe: getSwipe,
  getBrandList: getBrandList,
  getBrandDetail: getBrandDetail,
  getThumbs: getThumbs,
  getIndex: getIndex,
  getHand: getHand,
  getPaperNum: getPaperNum,
  getPaperList: getPaperList
}